
import 'dart:convert';

SchoolProgramsResult schoolProgramsResultFromJson(String str) =>
    SchoolProgramsResult.fromJson(json.decode(str));

String schoolProgramsResultToJson(SchoolProgramsResult data) =>
    json.encode(data.toJson());

class SchoolProgramsResult {
  SchoolProgramsResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  Result? result;

  factory SchoolProgramsResult.fromJson(Map<String, dynamic> json) =>
      SchoolProgramsResult(
        status: json["status"],
        message: json["message"],
        result: json["result"] != null ? Result.fromJson(json["result"]) : null,
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result != null ? result?.toJson() : null,
      };
}

class Result {
  Result({
    this.subResult,
  });

  List<SchoolProgram>? subResult;

  factory Result.fromJson(Map<String, dynamic> json) => Result(
        subResult: json["subResult"]!=null ? List<SchoolProgram>.from(
            json["subResult"].map((x) => SchoolProgram.fromJson(x))): null,
      );

  Map<String, dynamic> toJson() => {
        "subResult": subResult != null
            ? List<dynamic>.from(subResult!.map((x) => x.toJson()))
            : null,
      };
}

class SchoolProgram {
  SchoolProgram({
    this.name,
    this.id,
    this.lowerProgram,
  });

  String? name;
  String? id;
  List<LowerProgram>? lowerProgram;

  factory SchoolProgram.fromJson(Map<String, dynamic> json) => SchoolProgram(
        name: json["name"],
        id: json["id"],
        lowerProgram: json["lowerProgram"]!=null ? List<LowerProgram>.from(
            json["lowerProgram"].map((x) => LowerProgram.fromJson(x))): null,
      );

  Map<String, dynamic> toJson() => {
        "name": name,
        "id": id,
        "lowerProgram": lowerProgram != null
            ? List<dynamic>.from(lowerProgram!.map((x) => x.toJson()))
            : null,
      };
}

class LowerProgram {
  LowerProgram({
    this.name,
    this.id,
  });

  String? name;
  String? id;

  factory LowerProgram.fromJson(Map<String, dynamic> json) => LowerProgram(
        name: json["name"],
        id: json["id"],
      );

  Map<String, dynamic> toJson() => {
        "name": name,
        "id": id,
      };
}
